//
//  owner.m
//  ttsdktestapp
//
//  Created by wangna on 14-12-25.
//  Copyright (c) 2014年 wangna. All rights reserved.
//

#import "owner.h"
#import "../../ttsdk/ttsdk/owner.h"
#include <map>

@interface SDKOwner()
{
    Owner  * _owner;
    std::map<uint64_t, SDKGroup *> _group_map;
}
@end

@implementation SDKOwner

- (id)initWithObj:(id)owner
{
    self = [super init];
    if (self) {
        // Initialization code here.
        _owner = owner;
    }
    
    return self;
}

- (void) addGroup:(SDKGroup *) group
{
    _group_map.insert(std::pair<uint64_t, SDKGroup *>([group getId], group));
}

- (void) delGroup:(uint64_t) groupid
{
    std::map<uint64_t, SDKGroup *>::iterator it = _group_map.find(groupid);
    if (it != _group_map.end()) {
        _group_map.erase(it);
    }
}


@end
